package com.grass.p019lv.game.view;

import android.app.Dialog;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.fragment.app.DialogFragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;
import com.androidsa.bttsddka.R;

/* renamed from: com.grass.lv.game.view.WithDrawDialog */
public class WithDrawDialog extends DialogFragment implements View.OnClickListener {
    Interface anInterface;
    String data;
    TextView tv_content;

    /* renamed from: com.grass.lv.game.view.WithDrawDialog$Interface */
    public interface Interface {
        void go2Order();
    }

    public static WithDrawDialog newInstance() {
        Bundle bundle = new Bundle();
        WithDrawDialog withDrawDialog = new WithDrawDialog();
        withDrawDialog.setArguments(bundle);
        return withDrawDialog;
    }

    @Override // androidx.fragment.app.Fragment
    public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        return layoutInflater.inflate(R.layout.dialog_withdraw_layout, viewGroup, false);
    }

    @Override // androidx.fragment.app.DialogFragment
    public Dialog onCreateDialog(Bundle bundle) {
        DialogC30511 r3 = new Dialog(getActivity(), R.style.ForceUpdateAppDialog) {
            /* class com.grass.p019lv.game.view.WithDrawDialog.DialogC30511 */

            public void onBackPressed() {
                super.onBackPressed();
            }
        };
        r3.setCancelable(true);
        r3.setCanceledOnTouchOutside(true);
        return r3;
    }

    @Override // androidx.fragment.app.Fragment, androidx.fragment.app.DialogFragment
    public void onActivityCreated(Bundle bundle) {
        super.onActivityCreated(bundle);
        if (TextUtils.isEmpty(this.data)) {
            dismiss();
        } else {
            this.tv_content.setText(this.data);
        }
    }

    @Override // androidx.fragment.app.Fragment
    public void onViewCreated(View view, Bundle bundle) {
        super.onViewCreated(view, bundle);
        this.tv_content = (TextView) view.findViewById(R.id.tv_content);
        view.findViewById(R.id.tv_confirm).setOnClickListener(this);
        view.findViewById(R.id.tv_view_order).setOnClickListener(this);
    }

    public void setData(String str) {
        this.data = "成功申請提現" + str + "元";
    }

    public void onClick(View view) {
        Interface r3;
        if (view.getId() == R.id.tv_confirm) {
            dismiss();
        } else if (view.getId() == R.id.tv_view_order && (r3 = this.anInterface) != null) {
            r3.go2Order();
        }
    }

    @Override // androidx.fragment.app.DialogFragment
    public void show(FragmentManager fragmentManager, String str) {
        FragmentTransaction beginTransaction = fragmentManager.beginTransaction();
        beginTransaction.add(this, str);
        beginTransaction.commitAllowingStateLoss();
    }

    public void setAnInterface(Interface r1) {
        this.anInterface = r1;
    }

    @Override // androidx.fragment.app.DialogFragment
    public void dismiss() {
        dismissAllowingStateLoss();
    }
}
